#include<bits/stdc++.h>
using namespace std;
int a[1000];
int main()
{
	int n,i;
	cin>>n;
	for(i=1;i<=n;i++)
	cin>>a[i];
	sort(a+1,a+n+1);
	if(n%2) cout<<a[n/2+1];
	else cout<<(a[n/2]+a[n/2+1])/2;
    return 0;
}
